import axios from 'axios'
export const getCategoryList = params => axios.get(`/web/category/getCategoryList?type=${params}`) // 获取分类列表
export const getVideoListByCategoryId = params => axios.get(`/web/category/getVideoListByCategoryId`, {
  params: { ...params }
}) // 根据分类id获取课程列表
export const getVideoInfo = (rid, userId) => axios.get(`/web/category/getVideoInfo?rid=${rid}&userId=${userId}`) // 根据分类id获取课程列表
export const getSelectVideoOutlineDetailList = params => axios.get(`/web/category/selectVideoOutlineDetailList?videoId=${params}`) // 根据分类id获取课程列表
/**
 * 收藏相关
 */
export const toggleCollect = params => axios.post('/web/usercollect/toggleCollect', params) // 收藏/取消收藏
export const addUserVideoLike = params => axios.get(`/web/uservideolike/addUserVideoLike?videoId=${params.videoId}`) // 收藏/取消收藏
